package Homework6;

public class InvalidAgeException extends Exception {
    private int invalidAge;

    public InvalidAgeException(int invalidAge) {
        this.invalidAge = invalidAge;
    }

    public int getInvalidAge() {
        return invalidAge;
    }

    @Override
    public String toString() {
        return "InvalidAgeException: Invalid age " + invalidAge;
    }
}
